home *** CD-ROM | disk | FTP | other *** search
/ Tiger Disk 145 / Tiger_Disk_145_19xx_Tiger-Crew-Disk_de_Side_B.d64 / diskmaster 64 (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  6KB  |  201 lines

  1. 10 rem * disk master 64 *
  2. 100 rem menue
  3. 110 poke53280,4:poke53281,4:poke49152,8
  4. 120 clr:gn=peek(49152):di=0:poke198,0:print"[147][144]         *** disk master 64 ***"
  5. 130 print"  *** commodore single drive  1541 ***"
  6. 140 print"   *** (c)  1984 by mario walther ***"
  7. 150 print"[184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]";
  8. 160 print"1[146]  formatieren    7[146]  floppy adresse"
  9. 170 print"2[146]  initialize     8[146]  disk-name aendern"
  10. 180 print"3[146]  validate       9[146]  disk-id aendern"
  11. 190 print"4[146]  rename         c[146]  check disk"
  12. 200 print"5[146]  scratch        d[146]  directory"
  13. 210 print"6[146]  copy           e[146]  programm beenden"
  14. 300 getau$:ifau$=""then300
  15. 305 ifau$="e"then5000
  16. 306 ifau$="d"then400
  17. 307 ifau$="c"then2000
  18. 310 ifasc(au$)<49orasc(au$)>57then300
  19. 320 a=val(au$):onagoto700,900,1000,1100,1200,1300,1400,1800,1900
  20. 330 goto300
  21. 350 rem * fehlerkanal *
  22. 360 close15:open15,gn,15:input#15,en,en$,ne,ee:close15:ifenthen850
  23. 370 return
  24. 400 rem * directory *
  25. 405 print"[147]"
  26. 406 gosub410:goto415
  27. 410 print"bitte eine diskette ins laufwerk legen ![146]":gosub650:return
  28. 415 print"[147]bitte warten !":print"directory wird gelesen"
  29. 420 diml$(140),k$(140),f$(140)
  30. 430 open1,gn,0,"$":open15,gn,15:gosub440:goto450
  31. 440 input#15,en,en$,ne,ee:ifenthen850
  32. 445 return
  33. 450 get#1,a$,b$:ze=-1
  34. 455 ze=ze+1:get#1,a$,b$
  35. 456 get#1,a$,b$:c=0
  36. 460 ifa$<>""thenc=asc(a$)
  37. 470 ifb$<>""thenc=c+asc(b$)*256
  38. 480 l$(ze)=right$("   "+mid$(str$(c),2),3)
  39. 490 get#1,b$:ifst<>0thenfb$=right$("   "+l$,3):goto580
  40. 500 ifb$<>chr$(34)then490
  41. 510 f$(ze)=""
  42. 520 get#1,b$:ifb$<>chr$(34)thenf$(ze)=f$(ze)+b$:goto520
  43. 530 get#1,b$:ifb$=chr$(32)then530
  44. 540 c$=""
  45. 550 c$=c$+b$:get#1,b$:ifb$<>""then550
  46. 560 k$(ze)=left$(c$,3):ifze=0thenid$=left$(c$,5)
  47. 570 ifst=0then455
  48. 580 close1
  49. 590 print"[147]"f$(0);"  "id$" [146]"
  50. 600 yy=3:fory=1toze-1:yy=yy+1
  51. 610 print"[144]"l$(y)""f$(y);tab(21)left$(k$(y),3)
  52. 620 ifyy/24=int(yy/24)thengosub650:print"[147]"
  53. 630 next:print""l$(ze)" bloecke frei        [146]":gosub650
  54. 640 ifyy<25then120
  55. 641 print"directory wiederholen ?"
  56. 642 getau$:ifau$=""then642
  57. 643 ifau$="j"theny=0:goto590
  58. 644 ifau$="n"orau$=" "then120
  59. 645 goto641
  60. 650 poke198,0
  61. 651 getau$:ifau$=""then651
  62. 652 ifau$="_"then120
  63. 653 return
  64. 700 rem formatieren
  65. 710 print"[147]"spc(14)"formatieren[146]"
  66. 720 ifdi=0thengosub410:di=1:goto700
  67. 725 ifdi=2then740
  68. 730 input"disk-name[146] (max.16 z.) ";dn$:ifdn$=""then700
  69. 735 iflen(dn$)>16thendn$="":goto700
  70. 736 di=2:goto700
  71. 740 input"disk-id[146] (max.2 z.) ";di$:ifdi$=""orlen(di$)>2then700
  72. 751 print"ist die richtige diskette im laufwerk ? "
  73. 775 getau$:ifau$=""then775
  74. 776 ifau$="_"then120
  75. 777 ifau$="j"then780
  76. 778 ifau$="n"then775
  77. 780 print"[147]diskette wird formatiert"
  78. 790 print"name : ";dn$:print"id   : ";di$
  79. 800 close1:open1,8,15,"n:"+dn$+","+di$:gosub350:close1
  80. 810 goto1070
  81. 850 rem
  82. 860 print""en;en$;ne;ee:gosub650:goto120
  83. 900 rem
  84. 905 gosub910:goto920
  85. 910 print"[147]"spc(12)"initialisieren[146]":return
  86. 920 gosub410
  87. 950 gosub910:print"     diskette wird initialisiert"
  88. 960 close1:open1,gn,15,"i":gosub350:close1
  89. 970 goto1070
  90. 1000 rem
  91. 1010 print"[147]"spc(14)"validate[146]"
  92. 1020 gosub410
  93. 1050 print"      diskette wird validiert              "
  94. 1060 close1:open1,8,15,"v":close1:gosub350
  95. 1070 print"vorgang beendet":print"taste[146]":gosub650:goto120
  96. 1100 rem
  97. 1110 print"[147]"spc(17)"rename[146]"
  98. 1120 input"alter name";an$:ifan$=""then1110
  99. 1125 ifan$="_"then120
  100. 1130 input"neuer name";nn$:ifnn$=""thenprint"[145][145][145][145]":goto1130
  101. 1135 ifan$=nn$then120
  102. 1140 close1:open1,8,15,"r:"+nn$+"="+an$:close1:gosub350
  103. 1150 goto1070
  104. 1200 rem * scratch *
  105. 1210 print"[147]"spc(16)"scratch[146]"
  106. 1220 input"filename";na$:ifna$=""then1210
  107. 1225 ifna$="_"then120
  108. 1230 close1:open1,8,15,"s:"+na$:close1
  109. 1240 gosub350
  110. 1260 goto1070
  111. 1300 rem * copy *
  112. 1310 print"[147]"spc(18)"copy[146]"
  113. 1320 print"bitte das zu kopierende file eingeben !"
  114. 1330 input"";an$:ifan$=""then1310
  115. 1340 input"neuer name";nn$:ifnn$=""thenprint"[145][145][145]":goto1340
  116. 1350 close1:open1,8,15,"c:"+nn$+"="+an$:close1:gosub350
  117. 1360 goto1070
  118. 1400 rem * floppy nummer *
  119. 1410 print"[147]geraetenummer der floppy aendern[146]"
  120. 1420 print"bitte jetzt alle laufwerke ausschalten !";
  121. 1430 print"nur nicht die,deren nummer geaendert
  122. 1440 [153]"werden soll":[129]i[178]0[164]2000:[130]
  123. 1450 [133]"alte nummer  8  cmdcmdcmdcmdcmd";od
  124. 1460 [139]od[179]8[176]od[177]15[167][153]"ononononon":[137]1450
  125. 1470 [133]"neue nummer  9  cmdcmdcmdcmdcmd";nd
  126. 1480 [139]nd[179]8[176]nd[177]15[167][153]"onononon":[137]1470
  127. 1490 [141]1510:[141]1700
  128. 1500 [151]49152,nd:[137]1070
  129. 1510 [160]15:[159]15,gn,15
  130. 1520 [152]15,"m-r"[199](255)[199](255):[161]#15,c$:c[178][198](c$[170][199](0))
  131. 1530 [139]st[167][153]"fehler am geraet":[137]1070
  132. 1540 [139]c[178]254[167]mt[178]119
  133. 1550 [139]c[178]226[167]mt[178]50
  134. 1560 [139]c[178]213[167]mt[178]12
  135. 1570 [139]c[178]242[167]mt[178]12
  136. 1580 [139]c[178]198[167]1600
  137. 1590 [142]
  138. 1600 [152]15,"m-r"[199](234)[199](16):[161]#15,zb$:zb[178][198](zb$[170][199](0))
  139. 1610 [139]zb[178]0[167]mt[178]12
  140. 1620 [139]zb[178]1[167]1640
  141. 1630 [139]st[167]1530
  142. 1640 [152]15,"m-r"[199](172)[199](16):[161]#15,zc$:zc[178][198](zc$[170][199](0))
  143. 1650 [139]zc[178]1[167]mt[178]12
  144. 1660 [139]zc[178]2[167]mt[178]12
  145. 1670 [142]
  146. 1700 [160]15:[159]15,gn,15
  147. 1710 [152]15,"m-w"[199](mt)[199](0)[199](2)[199](nd[170]32)[199](nd[170]64)
  148. 1720 [142]
  149. 1800 [143] * disk name aendern *
  150. 1810 [153]"loaddisk name aendernwait"
  151. 1815 [141]410
  152. 1820 [159]15,gn,15:nr[178]0:[159]1,gn,3,"#":[152]15,"u1:3"nr",18,0"
  153. 1830 [152]15,"b-p:3,144":d$[178]"":[129]l[178]1[164]16:[161]#1,a$:d$[178]d$[170]a$:[130]
  154. 1840 [153]"alter disk-name: "d$
  155. 1850 od$[178]"disk master 64":[153]"neuer disk-name ";:[133]od$
  156. 1860 od$[178][200](od$[170]"                 ",16)
  157. 1870 [152]15,"b-p:3,144":[152]1,od$;:[152]15,"u2:3"nr",18,0":[160]1:[160]15
  158. 1880 [137]960
  159. 1900 [143] * disk id aendern *
  160. 1910 [153]"loaddisk id aendern"
  161. 1920 uu[178]0:[159]15,gn,15:[159]1,gn,3,"#":[152]15,"u1:3"dv",18,0"
  162. 1930 [152]15,"b-p:3,162":[161]#1,a$,b$,c$,d$,e$:[153]"alter disk-id: "a$;b$;c$;
  163. 1940 [153]d$;e$:[133]"neuer disk-id";oi$
  164. 1950 [139][195](oi$)[179]3[167]oi$[178]oi$[170]" ":[137]1950
  165. 1960 oi$[178][200](oi$[170]"2a",5)
  166. 1970 [152]15,"b-p:3,162":[152]1,oi$;:[152]15,"u2:3"uu",18,0
  167. 1980 goto960
  168. 2000 rem * check disk *
  169. 2010 print"[147]"spc(15)"check disk[146]"
  170. 2020 gosub410:dimt(100),s(100)
  171. 2030 open15,gn,15:print#15,"v0":n%=rnd(ti)*255
  172. 2040 a$="":fori=1to255:a$=a$+chr$(255and(i+n%)):next:gosub350
  173. 2050 open2,gn,2,"#":print:print#2,a$;:open15,gn,15
  174. 2051 t=1:s=0:print#15,"b-a:0"t;s
  175. 2060 input#15,en,em$,et,es:ifen=0then2090
  176. 2070 ifet=0then2140
  177. 2080 print#15,"b-a:0"et;es;:t=et:s=es
  178. 2090 print#15,"u2:2,0"t;s:nb=nb+1
  179. 2100 print"gepruefte bloecke"nb:print"spur     [157][157][157][157]"t;"sector     [157][157][157][157]"s"[145][145]"
  180. 2110 input#15,en,em$,es,et:ifen=0then2051
  181. 2120 t(j)=t:s(j)=s:j=j+1
  182. 2130 print"fehlerhafter block:[157][157]",t;s"":goto2051
  183. 2140 print#15,"i0":gosub350:close2:ifj=0thenprint"keine fehlerhaften bloecke"
  184. 2150 ifj=0then1070
  185. 2160 open2,gn,2,"#":print"fehlerhafte bloecke","track","sector"
  186. 2170 fori=0toj-1
  187. 2180 print#15,"b-a:0",t(i);s(i)
  188. 2190 print,,t(i),s(i):next
  189. 2200 print""j"fehlerhafte bloecke wurden gefunden":close2:goto1070
  190. 5000 rem * end *
  191. 5010 print"[147]       sind sie sicher ? (j/n) ";
  192. 5020 poke204,0
  193. 5030 getau$:ifau$=""then5030
  194. 5040 ifau$="j"then5100
  195. 5050 ifau$="n"thenpoke204,1:goto120
  196. 5060 goto5030
  197. 5100 poke204,1:print"[147]"spc(11)"disk master 64"
  198. 5110 print""spc(15)"      [146]"
  199. 5120 printspc(15)" ende [146]"
  200. 5130 printspc(15)"      [146][156]":fori=0to1000:next:sys64738
  201.